import re

match = re.compile(r'\d{6}')
sss = match.search('BJTU 100044 ''YANAN 716200')
try:
    print(sss.endpos)
except:'0'
